home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / incoming / jstools-.6v3 / jstools- / jstools-tk3.6v3.0 / lib / jdoc / jstools / customisation.jdoc < prev    next >
Encoding:
Text File  |  1995-03-14  |  6.3 KB  |  59 lines

  1. {Customising jstools Applications
  2. The applications in the jstools suite can be customised in several ways, including preferences panels, startup scripts, and X defaults.
  3.  
  4. Preferences
  5. All supported jstools applications (and to some extend other applications that use the jstools libraries) recognise the preferences set through the Global Preferences panel (q.v.).  This is normally available on the application's leftmost menu; it is also accessible through the standalone jprefs application.  Most applications also have an application¡specific preferences panel, which will also be available on the application's leftmost menu.  (The jedit editor has three levels of preferences; in addition to global and application¡specific preferences, it supports additional preferences for various types of files.)
  6.  
  7. (Preferences are stored in files under your ~/.tk directory (the directory .tk under your home directory).  Global preferences are stored in the file ~/.tk/defaults.  Application¡specific defaults for each application are stored in the file ~/.tk/app-defaults, where app is the name of the application.  You shouldn't need to edit these files by hand.)
  8.  
  9. Startup Scripts
  10. Most jstools applications support an application¡specific startup script in Tcl, called ~/.tk/apprc.tcl.  This script contains additional Tcl code that the application will execute when it starts up.  Exactly what it's appropriate to put in here varies from application to application, but in general you can redefine procedures used by the application to change their behaviour.  The documentation for each application that can be customised in this way will have more information.
  11.  
  12. In order to write application¡specific startup scripts effectively, you'll need to know Tcl and Tk, and you may need to know something about the structure of the application.  The book Tcl and the Tk Toolkit by the author of Tcl, John Ousterhout, (New York: Addison¡Wesley, 1994) is a good introduction to programming in Tcl, although you'll also need to refer to the manl pages.  You may also find that you can pick up enough by examining the jstools scripts themselves.
  13.  
  14. The jstools applications also support a special¡purpose startup scripts ~/.tk/textbindings.tcl and ~/.tk/entrybindings.tcl.  These are intended to supplement the keyboard bindings used by the applications, so you can make minor changes to them.  Unfortunately, I haven't written documentation about how to do this yet.  (You can include ordinary Tcl bind commands, but that may break things like jedit's special interpretation of punctuation and the Return key, or other special features of the bindings libraries.  I hope to document this in a future version.)
  15.  
  16. Sample configuration files
  17. If jstools was installed normally at your site, there will be a few sample configuration files in the directory samples in the jstools library directory (typically /usr/local/lib/jstools).
  18.  
  19. X Defaults
  20. You can also change the general appearance of the jstools applications (and other Tk applications) using the X defaults mechanism.  For reference, here are the defaults I use for Tk widgets:
  21.  
  22. ! defaults for Tk widgets:
  23. !
  24. Tk*Text*font:        -*-lucidatypewriter-medium-r-normal-*-*-100-*
  25. Tk*Listbox*font:     -*-lucidatypewriter-medium-r-normal-*-*-100-*
  26. Tk*Entry*font:       -*-lucidatypewriter-medium-r-normal-*-*-100-*
  27. Tk*Button*font:      -*-lucida-medium-r-normal-sans-*-100-*
  28. Tk*Checkbutton*font: -*-lucida-medium-r-normal-sans-*-100-*
  29. Tk*Radiobutton*font: -*-lucida-medium-r-normal-sans-*-100-*
  30. Tk*Menu*font:        -*-lucida-medium-r-normal-sans-*-100-*
  31. Tk*Menubutton*font:  -*-lucida-medium-r-normal-sans-*-100-*
  32. Tk*Label*font:       -*-lucida-medium-r-normal-sans-*-100-*
  33. Tk*Message*font:     -*-lucida-medium-r-normal-sans-*-100-*
  34. Tk*insertWidth:                1
  35. Tk*background:                grey80
  36. Tk*Text*background:            grey80
  37. Tk*Entry*background:            grey80
  38. Tk*Scale*sliderForeground:        grey80
  39. Tk*Scale*activeForeground:        grey90
  40. Tk*Scrollbar*background:        grey80
  41. Tk*Scrollbar*foreground:        grey80
  42. Tk*Scrollbar*activeForeground:        grey90
  43. Tk*activeBackground:            grey90
  44. Tk*selectBackground:            grey60
  45. Tk*selectForeground:            black
  46. Tk*disabledForeground:            grey50
  47. Tk*selector:                black
  48.  
  49. ##############################################################
  50. # metawidget options:
  51. #
  52. option add *Rule.relief sunken widgetDefault
  53. option add *Rule.width 2 widgetDefault
  54. option add *Rule.height 2 widgetDefault
  55. option add *Rule.borderWidth 1 widgetDefault
  56. option add *Filler.relief flat widgetDefault
  57. option add *Filler.width 10 widgetDefault
  58. option add *Filler.height 10 widgetDefault
  59. } {{{sel {16.0 17.0}} {jdoc:xref:link {2.24 2.31 2.83 2.101 2.103 2.118 2.124 2.134 5.4 5.34 5.83 5.104 5.144 5.172 5.290 5.296 5.453 5.458 10.5 10.12}} {jdoc:anchor:anchorname {4.0 5.0 9.0 10.0 16.0 17.0 19.0 20.0}} {richtext:font:roman {2.0 2.24 2.31 4.0 5.0 5.14 5.21 5.87 5.94 5.290 5.296 5.453 5.458 7.44 7.49 7.75 7.78 7.150 7.164 7.241 7.259 7.267 7.270 9.0 10.0 10.5 10.12 10.88 10.103 12.185 12.207 12.444 12.451 14.4 14.11 14.72 14.94 14.99 14.122 14.350 14.354 14.396 14.401 14.450 14.456 16.0 17.0 17.3 17.10 17.112 17.119 17.127 17.134 17.164 17.186 19.0 20.0 20.50 20.57 22.0 48.0 49.0}} {richtext:font:italic {7.247 7.250 7.267 7.270 10.94 10.97 12.185 12.207}} {richtext:font:bold {2.24 2.31 5.14 5.21 5.87 5.94 7.44 7.49 7.75 7.78 7.150 7.164 7.241 7.247 7.250 7.259 10.5 10.12 10.88 10.94 10.97 10.103 12.444 12.451 14.4 14.11 14.72 14.94 14.99 14.122 14.450 14.456 17.3 17.10 17.112 17.119 17.127 17.134 17.164 17.186 20.50 20.57}} {richtext:font:typewriter {5.290 5.296 5.453 5.458 14.350 14.354 14.396 14.401 22.0 48.0 49.0 59.0}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {4.0 5.0 9.0 10.0 16.0 17.0 19.0 20.0}} {jdoc:link:#Preferences {2.83 2.101}} {jdoc:link:jstools.jdoc {2.24 2.31 10.5 10.12}} {jdoc:link:jstools.jdoc#Applications {5.4 5.34}} {jdoc:link:jslibraries.jdoc {5.83 5.104}} {jdoc:link:panels/prefs.jdoc {5.144 5.172}} {jdoc:link:jprefs.jdoc {5.290 5.296}} {jdoc:link:jedit.jdoc {5.453 5.458}} {jdoc:anchorname:Preferences {4.0 5.0}} {jdoc:anchorname:Startup_Scripts {9.0 10.0}} {jdoc:anchorname:X_Defaults {19.0 20.0}} {jdoc:link:#Startup_Scripts {2.103 2.118}} {jdoc:link:#X_Defaults {2.124 2.134}} {jdoc:anchorname:Sample_configuration_files {16.0 17.0}}} {{matchend 10.419} {abbrevstart 18.0} {richptr 19.0} {abbrevend 18.0} {insert 16.0} {matchstart 10.408} {anchor 16.14} {current 14.470}}}